Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane: add Autoland mode #28771

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Hwurzburg
Copy link
Collaborator

@Hwurzburg Hwurzburg commented Nov 29, 2024

Captures ground course when gnd speed reaches 5m/s as takeoff direction in NAV_TAKEOFF and Mode Takeoff (if a reliable way to obtain a takeoff direction in other modes is determined, this can be expanded in the future)

Currently valid only for fixed wing configuration, quadplane wont enter mode...

Upon entry creates a final approach waypoint at parameterized distance and alt from home in the opposite direction of autotakeoff direction, flies to it and does a land exactly like NAV_LAND using full landing code for aborts. (Emulates my UniversalAutoLand LUA script #28591)

If a DO_LAND_START sequence(s) exist, will jump to them instead

If takeoff direction has not been captured then it will just not enterthe mode

If not flying it will not enter the mode

Adds it as a long failsafe action (will RTL if no takeoff direction has been captured)...qplane ignores it

Includes an autotest

Copy link
Contributor

@timtuxworth timtuxworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this idea - some suggestions.

ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
@robustini
Copy link
Contributor

robustini commented Nov 29, 2024

Very interesting, I would instead have a suggestion for a much more solid approach in my opinion, since yours is great for taxiing takeoffs but not for hand launches, which is often not necessarily the direction of the runway.
The automatism I propose requires a very trivial thing in Mission Planner, then Ardupilot on that can do all the reasoning for a land without doing complex missions.
This a simple emergency LAND mission that I often use with some of my fpv planes.
The operation is simple, the automatic manual launch that gives me time to switch to Loiter or force an RTL once the takeoff has happened correctly (so during the LOITER_TIME), gives me time to put on goggles and then switch to other flight modes and proceed.
I also set an alternate home a short distance away because I don't want it to loiter over our heads in an emergency.
In case of failsafe AUTO intervenes, then the plane goes back to the LOITER_TIME event that I had not let it finish and shortly thereafter executes the circuit for LAND.
During that LOITER_TIME if I have the tx out I have time to decide whether to have it continue or maybe intervene in telemetry in some other way, a system that has been tried hundreds of times before.

immagine

Instead, here is what I propose, in my opinion the most logical and hyper simple: if there was the possibility in Ardupilot to fix two points on the runway, to indicate LR of the correct axis would be more than enough to tell Ardupilot to use that line to perform any kind of LAND, so something like this.

immagine

In this very simple approach Ardupilot knows of the runway the direction, the center and the correct length, so he knows that that is the runway in all its useful aspects.
Then 2 coordinates (latitude and longitude for each of the two points) that can be entered perhaps from mission planning or with parameters would suffice.
This simple line would be enough to then do any kind of automated LAND developed for this approach, without perhaps having to resort to complex planning on Mission Planner.
This is an aviation approach already known for planes performing ILS or any other instrumental approaches to the runway, and has been using Micropilot for at least a decade.
These two points are enough to allow AUTOLAND to make no mistake.
Certainly your PR is more immediate but in my opinion less secure in many contexts, of course definitely better that than nothing but supplementing it with this would make it infallible imho.

@Hwurzburg
Copy link
Collaborator Author

Hwurzburg commented Nov 29, 2024

@robustini many people never use MP after initial setup and arent comfortable with mission planning....I never use missions other than autotakeoff/do-land-start/landing sequence with my mission selector app to select land direction for my field based on wind direction....or my UniversalAutoLand lua when travelling to other locations

this is the C++ implementation of my UniversalAutoLand lua script which I use when traveling and just stop at a location and fly...no laptop used..

@Hwurzburg Hwurzburg force-pushed the autoland branch 2 times, most recently from fcf710d to a1b1b13 Compare November 29, 2024 13:38
@timtuxworth
Copy link
Contributor

Should this be disabling fences (autoenabled, and floor) when doing a landing?

@Hwurzburg
Copy link
Collaborator Author

It does a NAV_LAND....so whatever it does or does not

@Hwurzburg Hwurzburg force-pushed the autoland branch 2 times, most recently from b4a7cc2 to e9b36f1 Compare November 30, 2024 15:08
@Hwurzburg Hwurzburg requested a review from tridge November 30, 2024 16:59
@Hwurzburg Hwurzburg force-pushed the autoland branch 8 times, most recently from 60a6dc9 to 64d7e89 Compare December 2, 2024 02:04
Tools/autotest/arduplane.py Outdated Show resolved Hide resolved
Tools/autotest/arduplane.py Outdated Show resolved Hide resolved
ArduPlane/Parameters.h Outdated Show resolved Hide resolved
ArduPlane/mode.h Outdated Show resolved Hide resolved
ArduPlane/events.cpp Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
@Hwurzburg Hwurzburg force-pushed the autoland branch 3 times, most recently from dc09056 to 9cba0f3 Compare December 2, 2024 19:05
@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Dec 2, 2024
ArduPlane/mode.h Outdated Show resolved Hide resolved
ArduPlane/mode_autoland.cpp Outdated Show resolved Hide resolved
@Hwurzburg Hwurzburg added the FlightTest PRs to flight test (please) label Dec 3, 2024
@Hwurzburg Hwurzburg force-pushed the autoland branch 6 times, most recently from 6a4445c to 436b498 Compare December 7, 2024 20:02
@Hwurzburg Hwurzburg force-pushed the autoland branch 3 times, most recently from 458ddcd to 68e88c7 Compare December 11, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FlightTest PRs to flight test (please) WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants